program main

    use easy_lua_m, only: get_value
    use, intrinsic :: iso_c_binding, only: c_ptr
    use lua
    implicit none

    type(c_ptr) :: l
    integer rc
    real, allocatable :: z(:, :)
    logical :: b

    inquire (file='example/demo.lua', exist=b)
    if (b) then
        l = lual_newstate()
        call lual_openlibs(l)
        rc = lual_loadfile(l, "example/demo.lua")
        rc = lua_pcall(l, 0, 0, 0)
        call get_value(l, z, "zs")

        print *, "zs(REAL) = ", z
        call lua_close(l)
    end if

end program main
! zs(REAL) =    1.00000000       3.00000000       2.00000000       4.00000000